<?php
// +----------------------------------------------------------------------
// | Copyright (c) 2018-2018 http://www.donglixia.net All rights reserved.
// +----------------------------------------------------------------------
// | Author: 十万马 <962863675@qq.com>
// +----------------------------------------------------------------------
// | DateTime: 2018-02-09 16:17
// +----------------------------------------------------------------------

namespace app\index\controller;

use app\index\model\Article;
use think\Request;

class Fund extends Base
{
    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        $this->currentModel = new Article();//实例化当前模型
    }

    /**
     * 详情页，爱心基金
     * @return mixed
     */
    public function detail()
    {
        $data = $this->currentModel->getArticleInfo(['art_id'=>155]);
        $this->assign('data', $data);
        if (empty($data)) {
            return $this->fetch(STATIC_PATH.'/404.html');
        }

        //获取banner
        $banner = $this->currentModel->getBanner('banner', 'AF');
        $this->assign('banner', $banner);

        return $this->fetch();
    }

}

